package com.imooc.service;

import com.imooc.dto.ImageHolder;
import com.imooc.dto.ShopExecution;
import com.imooc.entity.Shop;
import com.imooc.exceptions.ShopOperationException;

import java.io.File;
import java.io.InputStream;
import java.util.List;

/**
 * @author
 * @create 2018-07-31 14:21
 **/
public interface ShopService {


    /**
     * 分页返回店铺的列表
     * @param shop
     * @return
     */
    public List<Shop> getShopList(Shop shop);

    /**
     * 添加店铺信息
     * @param shop
     * @param shopImg
     * @param fileName
     * @return
     */
    public ShopExecution addShop(Shop shop, ImageHolder thumbnail);

    /**
     * 通过店铺Id获取店铺信息
     * @param shopId
     * @return
     */
    public Shop getByShopId(int shopId);

    /**
     * 更新店铺信息，包括对图片的处理
     * @param shop
     * @param shopImgInputStream
     * @param
     * @return
     */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail)throws ShopOperationException;

}
